unit uUniverse;

interface

uses cuVector, cuSimpleArrays, cuDebug, uSettings,
     uSolarSystem, uPlanet, uDefs;

type
  TUniverse = class( TObject )
  public
    SolarSystems : TSolarSystemList;
//    Fleet       : TFleetList;
//    StarLanes   : TStarLaneList;

    constructor Create();
    destructor Destroy(); override;

    procedure Reset();

    procedure createGalaxy();
    procedure createUniverse();

    procedure onDraw();
  end;

implementation

uses SysUtils;

constructor TUniverse.Create();
begin
  inherited;

  SolarSystems := TSolarSystemList.Create();
  Reset();
end;
destructor TUniverse.Destroy();
begin
  Reset();

  FreeAndNil( SolarSystems );

  inherited;
end;

procedure TUniverse.Reset();
begin
  SolarSystems.Reset();
end;

procedure TUniverse.createGalaxy();
begin
  DevConsole.Print(LOG_DEBUG1, 'TUniverse.createGalaxy()');
end;

procedure TUniverse.createUniverse();
var S : integer;
begin
  DevConsole.Print(LOG_DEBUG1, 'TUniverse.createUniverse - Creation of a Universe');

  for S := 0 to SettingsINI.iMaxSolarSystems-1 do
  begin
    SolarSystems.addSolarSystem( S, random(200000),random(200000) );
  end;
end;

procedure TUniverse.onDraw();
begin
end;

end.
